<!doctype html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<link rel="stylesheet" href="../../css/aui.css">
		<link rel="stylesheet" href="../../css/aliance.css">
		<link rel="stylesheet" type="text/css" href="../../css/libs/swiper.min.css" />
		<script src="../../js/libs/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/common.js"></script>
		<script src="../../js/api.js"></script>
		<script src="../../js/vue.min.js"></script>
		<script src="../../js/vue-resource.min.js"></script>
		<script src="../../js/libs/swiper.min.js"></script>
		<style>
			.swiper-container {
				width: 100%;
				height: 100%;
			}
			
			.swiper-slide {
				width: 100%;
				height: 10rem;
			}
		</style>
		<script>
			//获得参数(只对字母数字等有效,参数值为中文则不能传)
			function getQueryString(name) {
				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
				var r = window.location.search.substr(1).match(reg);
				if(r != null) return unescape(r[2]);
				return null;
			}
			var shopId = getQueryString('shopId');　　

			$(function() {
				var app = new Vue({
					el: '#app',
					data: {
						fenlei: [],
						showImg: []
					},
					updated: function () {
	                    this.$nextTick(function () {
	                        var mySwiper = new Swiper('.swiper-container', {
	                            autoplay: 5000,
	                            pagination : '.swiper-pagination',
	                            loop : true,
	                        });
	                    });
	               },
					mounted: function() {
						this.$nextTick(function() {
							this.myFenLei();
						})
					},
					methods: {
						myFenLei: function() {
							this.$http.get(SURL + "app/shops/store", {
								params: {
									"shopId": shopId
								}
							}).then(function(res) {
								console.log(res)
								this.fenlei = res.body.data;
								this.showImg = fenlei.storeImg;
								console.log(this.showImg)
							}).catch(function(req) {

							});

						},
						go_apply: function() { //方法
								location.href = "appIntegral.html?shopId=" + shopId;

						},
					}
				});


			})
		</script>
		<title>联盟商家详情</title>
	</head>

	<body class="lmBgB">
		<div id="app">
			<div class="lmTop">
				<img src="../../img/goIcon2.png" alt="" />{{fenlei.shopName}}
			</div>
			<div class="swiper-container">
				<div class="swiper-wrapper">
					<div class="swiper-slide" v-for="item4 in showImg">
						<img :src='item4' />
					</div>
				</div>
			</div>
			<div class="lmShopW lmshopG ">
				<img class="lmIcon" src="../../img/Img1.png" alt="" />
				<div>门店名称：{{fenlei.shopName}}</div>
			</div>
			<div class="lmShopW lmshopG ">
				<img class="lmIcon" src="../../img/Img2.png" alt="" />
				<div>营业电话：{{fenlei.telephone}}</div>
			</div>
			<div class="lmShopW lmshopG ">
				<img class="lmIcon" src="../../img/Img3.png" alt="" />
				<div>营业时间：<span>{{fenlei.startTime}}</span> ~ <span>{{fenlei.endTime}}</span></div>
			</div>
			<div class="lmShopW  lmshopG ">
				<img class="lmIcon" src="../../img/Img4.png" alt="" />
				<div>门店地址：{{fenlei.address}}</div>
			</div>
			<div class="lmBtn">
				<a class="btn1" href="javascript:;" @click="go_apply">申请积分</a>
				&nbsp;&nbsp;&nbsp;&nbsp;
				<a class="btn1" href="tel:{{fenlei.telephone}}">预约</a>
			</div>
		</div>
	</body>
</html>